\(\int \sqrt {a+b \sqrt {x}} x \, dx\) [2234]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 15, antiderivative size = 88 \[ \int \sqrt {a+b \sqrt {x}} x \, dx=-\frac {4 a^3 \left (a+b \sqrt {x}\right )^{3/2}}{3 b^4}+\frac {12 a^2 \left (a+b \sqrt {x}\right )^{5/2}}{5 b^4}-\frac {12 a \left (a+b \sqrt {x}\right )^{7/2}}{7 b^4}+\frac {4 \left (a+b \sqrt {x}\right )^{9/2}}{9 b^4} \]

[Out]

-4/3*a^3*(a+b*x^(1/2))^(3/2)/b^4+12/5*a^2*(a+b*x^(1/2))^(5/2)/b^4-12/7*a*(a+b*x^(1/2))^(7/2)/b^4+4/9*(a+b*x^(1
/2))^(9/2)/b^4

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {272, 45} \[ \int \sqrt {a+b \sqrt {x}} x \, dx=-\frac {4 a^3 \left (a+b \sqrt {x}\right )^{3/2}}{3 b^4}+\frac {12 a^2 \left (a+b \sqrt {x}\right )^{5/2}}{5 b^4}+\frac {4 \left (a+b \sqrt {x}\right )^{9/2}}{9 b^4}-\frac {12 a \left (a+b \sqrt {x}\right )^{7/2}}{7 b^4} \]

[In]

Int[Sqrt[a + b*Sqrt[x]]*x,x]

[Out]

(-4*a^3*(a + b*Sqrt[x])^(3/2))/(3*b^4) + (12*a^2*(a + b*Sqrt[x])^(5/2))/(5*b^4) - (12*a*(a + b*Sqrt[x])^(7/2))
/(7*b^4) + (4*(a + b*Sqrt[x])^(9/2))/(9*b^4)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int x^3 \sqrt {a+b x} \, dx,x,\sqrt {x}\right ) \\ & = 2 \text {Subst}\left (\int \left (-\frac {a^3 \sqrt {a+b x}}{b^3}+\frac {3 a^2 (a+b x)^{3/2}}{b^3}-\frac {3 a (a+b x)^{5/2}}{b^3}+\frac {(a+b x)^{7/2}}{b^3}\right ) \, dx,x,\sqrt {x}\right ) \\ & = -\frac {4 a^3 \left (a+b \sqrt {x}\right )^{3/2}}{3 b^4}+\frac {12 a^2 \left (a+b \sqrt {x}\right )^{5/2}}{5 b^4}-\frac {12 a \left (a+b \sqrt {x}\right )^{7/2}}{7 b^4}+\frac {4 \left (a+b \sqrt {x}\right )^{9/2}}{9 b^4} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 65, normalized size of antiderivative = 0.74 \[ \int \sqrt {a+b \sqrt {x}} x \, dx=\frac {4 \sqrt {a+b \sqrt {x}} \left (-16 a^4+8 a^3 b \sqrt {x}-6 a^2 b^2 x+5 a b^3 x^{3/2}+35 b^4 x^2\right )}{315 b^4} \]

[In]

Integrate[Sqrt[a + b*Sqrt[x]]*x,x]

[Out]

(4*Sqrt[a + b*Sqrt[x]]*(-16*a^4 + 8*a^3*b*Sqrt[x] - 6*a^2*b^2*x + 5*a*b^3*x^(3/2) + 35*b^4*x^2))/(315*b^4)

Maple [A] (verified)

Time = 3.57 (sec) , antiderivative size = 58, normalized size of antiderivative = 0.66

method result size
derivativedivides \(\frac {\frac {4 \left (a +b \sqrt {x}\right )^{\frac {9}{2}}}{9}-\frac {12 a \left (a +b \sqrt {x}\right )^{\frac {7}{2}}}{7}+\frac {12 a^{2} \left (a +b \sqrt {x}\right )^{\frac {5}{2}}}{5}-\frac {4 a^{3} \left (a +b \sqrt {x}\right )^{\frac {3}{2}}}{3}}{b^{4}}\) \(58\)
default \(\frac {\frac {4 \left (a +b \sqrt {x}\right )^{\frac {9}{2}}}{9}-\frac {12 a \left (a +b \sqrt {x}\right )^{\frac {7}{2}}}{7}+\frac {12 a^{2} \left (a +b \sqrt {x}\right )^{\frac {5}{2}}}{5}-\frac {4 a^{3} \left (a +b \sqrt {x}\right )^{\frac {3}{2}}}{3}}{b^{4}}\) \(58\)

[In]

int(x*(a+b*x^(1/2))^(1/2),x,method=_RETURNVERBOSE)

[Out]

4/b^4*(1/9*(a+b*x^(1/2))^(9/2)-3/7*a*(a+b*x^(1/2))^(7/2)+3/5*a^2*(a+b*x^(1/2))^(5/2)-1/3*a^3*(a+b*x^(1/2))^(3/
2))

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.62 \[ \int \sqrt {a+b \sqrt {x}} x \, dx=\frac {4 \, {\left (35 \, b^{4} x^{2} - 6 \, a^{2} b^{2} x - 16 \, a^{4} + {\left (5 \, a b^{3} x + 8 \, a^{3} b\right )} \sqrt {x}\right )} \sqrt {b \sqrt {x} + a}}{315 \, b^{4}} \]

[In]

integrate(x*(a+b*x^(1/2))^(1/2),x, algorithm="fricas")

[Out]

4/315*(35*b^4*x^2 - 6*a^2*b^2*x - 16*a^4 + (5*a*b^3*x + 8*a^3*b)*sqrt(x))*sqrt(b*sqrt(x) + a)/b^4

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1987 vs. \(2 (82) = 164\).

Time = 1.47 (sec) , antiderivative size = 1987, normalized size of antiderivative = 22.58 \[ \int \sqrt {a+b \sqrt {x}} x \, dx=\text {Too large to display} \]

[In]

integrate(x*(a+b*x**(1/2))**(1/2),x)

[Out]

-64*a**(49/2)*x**8*sqrt(1 + b*sqrt(x)/a)/(315*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x*
*9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) +
64*a**(49/2)*x**8/(315*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x*
*(19/2) + 4725*a**16*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) - 352*a**(47/2)*b*x**(17/
2)*sqrt(1 + b*sqrt(x)/a)/(315*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*
b**7*x**(19/2) + 4725*a**16*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 384*a**(47/2)*b*
x**(17/2)/(315*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2)
+ 4725*a**16*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) - 792*a**(45/2)*b**2*x**9*sqrt(1
+ b*sqrt(x)/a)/(315*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(1
9/2) + 4725*a**16*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 960*a**(45/2)*b**2*x**9/(3
15*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16
*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) - 924*a**(43/2)*b**3*x**(19/2)*sqrt(1 + b*sqr
t(x)/a)/(315*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) +
4725*a**16*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 1280*a**(43/2)*b**3*x**(19/2)/(31
5*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16*
b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) - 420*a**(41/2)*b**4*x**10*sqrt(1 + b*sqrt(x)/
a)/(315*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*
a**16*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 960*a**(41/2)*b**4*x**10/(315*a**20*b*
*4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16*b**8*x**10
 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 756*a**(39/2)*b**5*x**(21/2)*sqrt(1 + b*sqrt(x)/a)/(31
5*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16*
b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 384*a**(39/2)*b**5*x**(21/2)/(315*a**20*b**4
*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16*b**8*x**10 +
 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 2268*a**(37/2)*b**6*x**11*sqrt(1 + b*sqrt(x)/a)/(315*a**
20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16*b**8*
x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 64*a**(37/2)*b**6*x**11/(315*a**20*b**4*x**8 + 18
90*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16*b**8*x**10 + 1890*a**1
5*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 2988*a**(35/2)*b**7*x**(23/2)*sqrt(1 + b*sqrt(x)/a)/(315*a**20*b**
4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16*b**8*x**10
+ 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 2196*a**(33/2)*b**8*x**12*sqrt(1 + b*sqrt(x)/a)/(315*a*
*20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*a**16*b**8
*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 860*a**(31/2)*b**9*x**(25/2)*sqrt(1 + b*sqrt(x)/
a)/(315*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2) + 4725*
a**16*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11) + 140*a**(29/2)*b**10*x**13*sqrt(1 + b*s
qrt(x)/a)/(315*a**20*b**4*x**8 + 1890*a**19*b**5*x**(17/2) + 4725*a**18*b**6*x**9 + 6300*a**17*b**7*x**(19/2)
+ 4725*a**16*b**8*x**10 + 1890*a**15*b**9*x**(21/2) + 315*a**14*b**10*x**11)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.73 \[ \int \sqrt {a+b \sqrt {x}} x \, dx=\frac {4 \, {\left (b \sqrt {x} + a\right )}^{\frac {9}{2}}}{9 \, b^{4}} - \frac {12 \, {\left (b \sqrt {x} + a\right )}^{\frac {7}{2}} a}{7 \, b^{4}} + \frac {12 \, {\left (b \sqrt {x} + a\right )}^{\frac {5}{2}} a^{2}}{5 \, b^{4}} - \frac {4 \, {\left (b \sqrt {x} + a\right )}^{\frac {3}{2}} a^{3}}{3 \, b^{4}} \]

[In]

integrate(x*(a+b*x^(1/2))^(1/2),x, algorithm="maxima")

[Out]

4/9*(b*sqrt(x) + a)^(9/2)/b^4 - 12/7*(b*sqrt(x) + a)^(7/2)*a/b^4 + 12/5*(b*sqrt(x) + a)^(5/2)*a^2/b^4 - 4/3*(b
*sqrt(x) + a)^(3/2)*a^3/b^4

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 134 vs. \(2 (64) = 128\).

Time = 0.29 (sec) , antiderivative size = 134, normalized size of antiderivative = 1.52 \[ \int \sqrt {a+b \sqrt {x}} x \, dx=\frac {4 \, {\left (\frac {9 \, {\left (5 \, {\left (b \sqrt {x} + a\right )}^{\frac {7}{2}} - 21 \, {\left (b \sqrt {x} + a\right )}^{\frac {5}{2}} a + 35 \, {\left (b \sqrt {x} + a\right )}^{\frac {3}{2}} a^{2} - 35 \, \sqrt {b \sqrt {x} + a} a^{3}\right )} a}{b^{3}} + \frac {35 \, {\left (b \sqrt {x} + a\right )}^{\frac {9}{2}} - 180 \, {\left (b \sqrt {x} + a\right )}^{\frac {7}{2}} a + 378 \, {\left (b \sqrt {x} + a\right )}^{\frac {5}{2}} a^{2} - 420 \, {\left (b \sqrt {x} + a\right )}^{\frac {3}{2}} a^{3} + 315 \, \sqrt {b \sqrt {x} + a} a^{4}}{b^{3}}\right )}}{315 \, b} \]

[In]

integrate(x*(a+b*x^(1/2))^(1/2),x, algorithm="giac")

[Out]

4/315*(9*(5*(b*sqrt(x) + a)^(7/2) - 21*(b*sqrt(x) + a)^(5/2)*a + 35*(b*sqrt(x) + a)^(3/2)*a^2 - 35*sqrt(b*sqrt
(x) + a)*a^3)*a/b^3 + (35*(b*sqrt(x) + a)^(9/2) - 180*(b*sqrt(x) + a)^(7/2)*a + 378*(b*sqrt(x) + a)^(5/2)*a^2
- 420*(b*sqrt(x) + a)^(3/2)*a^3 + 315*sqrt(b*sqrt(x) + a)*a^4)/b^3)/b

Mupad [B] (verification not implemented)

Time = 5.80 (sec) , antiderivative size = 64, normalized size of antiderivative = 0.73 \[ \int \sqrt {a+b \sqrt {x}} x \, dx=\frac {4\,{\left (a+b\,\sqrt {x}\right )}^{9/2}}{9\,b^4}-\frac {12\,a\,{\left (a+b\,\sqrt {x}\right )}^{7/2}}{7\,b^4}-\frac {4\,a^3\,{\left (a+b\,\sqrt {x}\right )}^{3/2}}{3\,b^4}+\frac {12\,a^2\,{\left (a+b\,\sqrt {x}\right )}^{5/2}}{5\,b^4} \]

[In]

int(x*(a + b*x^(1/2))^(1/2),x)

[Out]

(4*(a + b*x^(1/2))^(9/2))/(9*b^4) - (12*a*(a + b*x^(1/2))^(7/2))/(7*b^4) - (4*a^3*(a + b*x^(1/2))^(3/2))/(3*b^
4) + (12*a^2*(a + b*x^(1/2))^(5/2))/(5*b^4)